package com.oop.test;

public class TV {
	private String color;
	private double price;
	private double screenSize;
	RemoteControl rc = new RemoteControl();

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public double getScreenSize() {
		return screenSize;
	}

	public void setScreenSize(double screenSize) {
		this.screenSize = screenSize;
	}

	public void showTVinfo() {
		System.out.println(
				"这是一个" + this.getColor() + "的电视机，价格" + this.getPrice() + "元，屏幕尺寸" + this.getScreenSize() + "寸！");
	}

	public TV(String color, double price, double screenSize) {
		super();
		this.color = color;
		this.price = price;
		this.screenSize = screenSize;
	}

	public static void main(String[] args) {
		TV tv = new TV("黑色", 4999, 52);
		tv.showTVinfo();
		tv.rc.setRemoteColor("白色");
		tv.rc.setWeight(80);
		tv.rc.setWirelessRange(100);
		tv.rc.showInfo();
		tv.rc.startup();
		tv.rc.shutdown();
		tv.rc.remoteSwitch();
	}
}
